//------------------------------------------------------------------------------

#ifndef varinit_H
#define varinit_H

#define DIAG_RESP_ID     (0x740)
//------------------------------------------------------------------------------
/* struct of can message */
typedef struct _canstruct
{
   unsigned int id;
   unsigned int dlc;
   unsigned char data[8];
}CanMessage;
//------------------------------------------------------------------------------

CanMessage Can_Msg1;
CanMessage Can_Msg2;
CanMessage Can_Msg3;
CanMessage Can_Msg4;

unsigned char MsgCount1;
unsigned char MsgCount2;
unsigned char MsgCount3;
unsigned char MsgCount4;

unsigned char MsgCountValue1;
unsigned char MsgCountValue2;
unsigned char MsgCountValue3;
unsigned char MsgCountValue4;

//-------------------------------
unsigned int TxCounter=0;
unsigned int RxCounter=0;
unsigned int TxCounterOld=0;
unsigned int RxCounterOld=0;
//-------------------------------
UINT g_TIMEID;
unsigned char counterCycle1=9;
unsigned char counterCycle2=9;
unsigned char counterCycle3=9;
DWORD Handle1,Handle2;
//--------------------------------
bool ReceiveSts;
unsigned char ReadWriteID=0;
int stat;
int handle;
long id;
unsigned char RxData[8];
unsigned int dlc, flags;
unsigned long timestamp;
//--------------------------------

void Cycle10ms(void);
void Cycle100ms(void);
void Cycle1000ms(void);

void Msg1Send(void);
void Msg2Send(void);
void Msg3Send(void);
void Msg4Send(void);
//--------------------------------

#endif
